<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="../../resources/js-test.js"></script>
<script src="resources/utilities.js"></script>
</head>
<body>

<script>
description("Verify the canonicalization of Safari Extension URLs.")

safariExtensionTestSet = [
    ['safari-extension://', 'safari-extension://'],
    ['safari-extension://com.apple/', 'safari-extension://com.apple/'],
    ['safari-extension://com.ApPlE/', 'safari-extension://com.ApPlE/'],
    ['safari-extension://com.fête/', 'safari-extension://com.f%C3%AAte/'],
]

for (var i = 0; i < safariExtensionTestSet.length; ++i) {
    src = canonicalize(safariExtensionTestSet[i][0]);
    expected = safariExtensionTestSet[i][1];
    shouldBe('src', 'expected');
}

successfullyParsed = true;
</script>
</body>
</html>
